<template>
  <div>
    {{ $store.state.xxx }}
    <button @click="btnClick">我要同时修改sona与sonb</button>
    <sona></sona>
    <sonb></sonb>
  </div>
</template>
<script>
// 组件套用组件1：导入 2：注册  3使用
import sona from '@/components/sona.vue'
import sonb from '@/components/sonb.vue'
export default {
  components: {
    sona,
    sonb
  },
  methods: {
    btnClick () {
      this.$store.state.msg = '我是app修改的' + Date.now()
      this.$store.state.msga = '我是app修改的' + Date.now()
    }
  }
}
</script>
<style></style>
